import logging
import yagmail

def log_set():
    logging.basicConfig(level=logging.DEBUG,format='%(relativeCreated)d',filename='log.txt')

def send_email(a):
    email=yagmail.SMTP(user="2372874896@qq.com",password="xnutbalfcyghebef",port='smtp.qq.com')
    email.send(to='2372874896@qq.com',contents='test.report',subject='测试报告',attachments=a)